package com.ruoyi.crm.domain;

import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Builder;
import lombok.Getter;
import lombok.Setter;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;

/**
 * 费用管理对象 crm_cost
 *
 * @author ruoyi
 * @date 2024-12-04
 */
@Getter
@Setter
public class CrmCost implements Serializable {
    private static final long serialVersionUID = 1L;

    /** 主键 */
    @TableId(type = IdType.ASSIGN_ID)
    private String id;

    /** 部门id */
    @Excel(name = "部门id")
    private Long deptId;

    /** 用户id */
    @Excel(name = "用户id")
    private String userId;

    /** 总金额 */
    @Excel(name = "总金额")
    private BigDecimal grossAmount;

    /** 是否处理 */
    @Excel(name = "是否处理")
    private String isDispose;

    /** 出差事由 */
    @Excel(name = "出差事由")
    private String businessTrip;


    private String customerId;

    /** 商机id */
    private String orderId;

    /** 创建时间 */
    @Excel(name = "创建时间", dateFormat = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;


    /** 部门名称 */
    @Excel(name = "部门名称")
    @TableField(exist = false)
    private String deptName;

    /** 用户名称 */
    @TableField(exist = false)
    @Excel(name = "用户名称")
    private String userName;

    /** 所属部门id */
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private String applyDeptId;

    /** 所属用户id */
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private String applyUserId;

    /** 所属用户id */
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private String applyGroupId;

    /** 项目归属 */
    private String applyAscription;

    /** 所属部门名称 */
    @TableField(exist = false)
    @Excel(name = "所属部门名称")
    private String applyDeptName;

    /** 所属商机 */
    @TableField(exist = false)
    @Excel(name = "所属商机")
    private String orderName;

    /** 所属用户名称 */
    @TableField(exist = false)
    @Excel(name = "用户名称")
    private String applyUserName;

    /** 所属小组 */
    @TableField(exist = false)
    @Excel(name = "所属小组")
    private String applyGroupName;


    @TableField(exist = false)
    private String customerName;

    /**
     * 请求参数
     */
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    @TableField(exist = false)
    private Map<String, Object> params;

    /**
     * 搜索值
     */
    @TableField(exist = false)
    private String searchValue;

    public String getSearchValue() {
        return searchValue;
    }

    public void setSearchValue(String searchValue) {
        this.searchValue = searchValue;
    }

    public Map<String, Object> getParams() {
        if (params == null) {
            params = new HashMap<>();
        }
        return params;
    }

    public void setParams(Map<String, Object> params) {
        this.params = params;
    }
}
